package com.xca.znb.presenter;

import com.xca.znb.contact.SaleHomeContact;
import com.xca.znb.entity.News;
import com.xca.znb.model.imodel.ISaleHome;

import java.util.List;

public class SaleHomePresenter {
    private SaleHomeContact saleHomeContact ;
    private ISaleHome iSaleHome ;
    public SaleHomePresenter(SaleHomeContact contact , ISaleHome iSaleHome){
        this.saleHomeContact = contact ;
        this.iSaleHome = iSaleHome ;
    }
    public void onGoBuyButtonClick(){
        saleHomeContact.onGoBuyButtonClick();
    }

    public double getDaySales(String phone , String time_day){
        return iSaleHome.getDaySales(phone, time_day);
    }

    public double getMonthSales(String phone , String time_month){
        return iSaleHome.getMonthSales(phone, time_month);
    }

    public double getTotalSales(String phone){
        return iSaleHome.getTotalSales(phone);
    }
    public List<News> getNews() {
        return iSaleHome.getNews();
    }
}
